import { Button } from "antd";
import { useState } from "react";

interface  MyButtonProps {
    text: string;
    disabled ?: boolean;
    onClick?: () => void;
	className?: string;
}
function MyButton(props: MyButtonProps) {
    const [disabled, setDisabled] = useState(false);
    const buttonClick = () => {
        setDisabled(true);
    }
    return (
        <>
            <Button className={props.className} onClick={buttonClick} disabled={disabled}>
                {props.text}
            </Button>
            <Button>
                {props.text}
            </Button>
        </>

    )
}
export default MyButton;